package com.aya.copy.tools.action;

import com.intellij.psi.PsiClass;

public class BeanDefinition {
    public static final String SPACE = " ";
    public static final String SET = "=";
    public static final String NEW = "new";
    private String name;

    private PsiClass psiClass;

    public String getName() {
        return this.name;
    }

    public void setName(final String name) {
        this.name = name;
    }

    public PsiClass getPsiClass() {
        return this.psiClass;
    }

    public void setPsiClass(final PsiClass psiClass) {
        this.psiClass = psiClass;
    }

    public String buildDeclaring() {
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append(psiClass.getName()).append(SPACE);
        stringBuilder.append(name).append(SET);
        stringBuilder.append(NEW).append(SPACE).append(psiClass.getName());
        stringBuilder.append("();");
        return stringBuilder.toString();
    }
}
